#/usr/bin/sh

base_dir="src/alfresco-webscripts/"
base_space="com/medranocg/gd/"
lines=$(find "$base_dir" -name "*js" -o -name "*xml" -o -name "*ftl")

for line in $lines; do 
  curl -v --ftp-create-dirs -T "$line" "ftp://admin:admin@10.0.3.42:2021/Alfresco/Data Dictionary/Web Scripts/${line/$base_dir/$base_space}"
done;

